# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=rtlsdr-scanner
pkgver=1013.3c032de
pkgrel=5
groups=('blackarch' 'blackarch-scanner')
pkgdesc='A cross platform Python frequency scanning GUI for the OsmoSDR rtl-sdr library.'
url='https://github.com/EarToEarOak/RTLSDR-Scanner'
arch=('any')
license=('GPL3')
depends=('python2' 'python2-pyrtlsdr' 'wxpython' 'python2-pyserial'
         'python2-pillow6' 'python2-numpy' 'rtl-sdr' 'python2-matplotlib')
makedepends=('git' 'python2-setuptools')
source=("$pkgname::git+https://github.com/EarToEarOak/RTLSDR-Scanner.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  python2 setup.py build
}

package() {
  cd $pkgname

  python2 setup.py install --root="$pkgdir" --skip-build

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" readme.md
  install -Dm 644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}

